package com.kgc.scd.service;


import com.kgc.scd.bean.OrderComment;
import com.kgc.scd.bean.OrderNotComment;
import com.kgc.scd.util.PageSupport;
import com.kgc.scd.util.RequestResult;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * Created On : 2022/6/17.
 * <p>
 * Author     : hi
 * <p>
 * Description: CommentService
 */
@FeignClient(value = "blmall-server-wzy-8106")
public interface CommentService {
    /**
     * @param :
     * @return :
     * @author : hi
     * @date : 2022/6/17
     * @description : 添加商品评论
     */
    @GetMapping("/addComment")
    RequestResult<Object> addComment(@RequestParam("commProid") String commProid,
                                     @RequestParam("commContent") String commContent,
                                     @RequestParam("commLevel") Integer commLevel,
                                     @RequestParam("orderId") String orderId,
                                     @RequestParam("userId") String userId);

    /**
     * @param :
     * @return :
     * @author : hi
     * @date : 2022/6/17
     * @description : 追加商品评论
     */

    @PostMapping("/superaddition")
    RequestResult<Object> superaddition(@RequestParam("commProid") String commProid,
                                        @RequestParam("orderId") String orderId,
                                        @RequestParam("commAdd") String commAdd,
                                        @RequestParam("userId") String userId);


    /**
     * @author : hi
     * @date   : 2022/6/16
     * @param  : [java.lang.String, java.lang.String]
     * @return : com.kgc.scd.util.RequestResult<java.lang.String>
     * @description : 查看我的待评价和已评价记录。
     */

    @PostMapping("/FeedbackHistory")
    RequestResult<PageSupport<OrderNotComment>> FeedbackHistory(@RequestParam("userId") String userId,
                                                          @RequestParam(value = "pageSize")Integer pageSize,
                                                          @RequestParam(value = "pageNo")Integer pageNo);


    @PostMapping("/OrderCommentList")
    RequestResult<PageSupport<OrderComment>> OrderCommentList(@RequestParam("userId") String userId,
                                                              @RequestParam("commLevel") Integer commLevel,
                                                              @RequestParam("orderByDate") Integer orderByDate,
                                                              @RequestParam(value = "pageSize")Integer pageSize,
                                                              @RequestParam(value = "pageNo")Integer pageNo);
}